package com.board.action.admin;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.board.action.Action;
import com.board.dto.BoardUserDto;
import com.board.servlce.BoardUserService;
import com.board.servlceimple.BoardRepServiceImp;
import com.board.servlceimple.BoardUserServiceImp;
import com.board.servlet.helper.ActionForward;

public class UserListAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward forward=new ActionForward();
		BoardUserService service=BoardUserServiceImp.getInstance();
		List<BoardUserDto> userlist=service.getAllUsers();
		request.setAttribute("lists",userlist);
		forward.setUrl("adminlist");
		
		return forward;
	}

}
